#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s;
	cin >> s;
	string ret;
	int n = s.size();
	for (int i = 0; i < n; i++)
	{
		ret += s[i];
		if ((n - i - 1) % 3 == 0 && i != n - 1) ret += ',';
	}
	cout << ret << endl;
	return 0;
}